﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IHISCETeim.DAL;
using IHISCETeim.Model;
using IHISCETeim.Library;
using System.Data;

namespace IHISCETeim.BLL
{
    public class AgentQltyReportController
    {
        /// <summary>
        /// 月份市场机器故障次数统计
        /// </summary>
        /// <param name="fromdate"></param>
        /// <param name="todate"></param>
        /// <returns></returns>
        public static DataTable GetMarketFailure(string fromdate, string todate)
        {
            return AgentQltyReportDAL.GetMarketFailure(Convert.ToDateTime(fromdate), Convert.ToDateTime(todate));
        }

        /// <summary>
        /// 月份机器各工作时段不良数量
        /// </summary>
        /// <param name="fromdate"></param>
        /// <param name="todate"></param>
        /// <returns></returns>
        public static DataTable GetDefectNo(string fromdate, string todate)
        {
            return AgentQltyReportDAL.GetDefectNo(Convert.ToDateTime(fromdate), Convert.ToDateTime(todate));
        }
        /// <summary>
        /// 主要故障项目统计表
        /// </summary>
        /// <param name="fromdate"></param>
        /// <param name="todate"></param>
        /// <returns></returns>
        public static DataTableCollection GetMainFault(string fromdate, string todate)
        {
            return AgentQltyReportDAL.GetMainFault(Convert.ToDateTime(fromdate), Convert.ToDateTime(todate));
        }
    }
}
